package com.ccit.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.sql.Timestamp;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("商品订单")
@Document("GoodsOrder")
@TableName("goods_order")
public class GoodsOrder {
    @Id
    @TableId(value = "id", type = IdType.AUTO)
    private String id;

    @ApiModelProperty(value = "商品id")
    @TableField(value = "goods_id")
    private Long goodsId;

    @ApiModelProperty(value = "商品id")
    @TableField(value = "goods_name")
    private String goodsName;

    @ApiModelProperty(value = "用户手机号")
    @TableField(value = "phone")
    private String phone;

    @ApiModelProperty(value = "订单时间")
    @TableField(value = "time")
    private Date time;

    @ApiModelProperty(value = "订单费用")
    @TableField(value = "cost")
    private double cost;

    @ApiModelProperty(value = "商品数量")
    @TableField(value = "num")
    private Integer num;


}
